// 供应商货品 
// 作者：洪刚
import axios from "axios";

export default {
    //得到当前供应商的货品
    async getSuppliergoods(query = {}, id) {
        const data = await axios.get("/api/supplier/suppliergoods/" + id,{
            params:query
        });
        return data.data;
    },
    async deleteSuppliergoods(id) {
        await axios.delete("/api/suppliergoods/" + id);
    },
    async addSuppliergoods(user) {
        const resp = await axios.post("/api/suppliergoods/add", user);
        return resp.data;
    },
    async getSuppliergoodsById(id) {
        const resp = await axios.get("/api/suppliergoods/" + id);
        return resp.data;
    },
    async modifySuppliergoods(u) {
        await axios.put("/api/suppliergoods/" + u._id, u);
    }
}